package com.zusmart.test.service.impl;

import java.lang.reflect.Method;

import com.zusmart.core.bean.annotation.Component;
import com.zusmart.core.bean.annotation.Interceptor;
import com.zusmart.core.interceptor.InterceptorFactory;

//拦截器,拦截指定的类
@Component
@Interceptor(classes = LocalMemberServiceImpl.class)
public class InterceptorService extends InterceptorFactory {

	@Override
	protected void onBefore(Class<?> targetClass, Method targetMethod, Object[] arguments) throws Throwable {
		System.out.println(targetMethod.getName() + " before 执行");
	}

	@Override
	protected void onAfter(Class<?> targetClass, Method targetMethod, Object[] arguments, Object result) throws Throwable {
		System.out.println(targetMethod.getName() + " after 执行 -> 执行结果为 -> " + result);
	}

}